unit uf_splash;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
  ExtCtrls, Grids, Buttons, StdCtrls;

type
  Tf_splash = class(TForm)
    im: TImage;
    Timer1: TTimer;
    procedure imClick(Sender: TObject);
    procedure FormCreate(Sender: TObject);
    procedure FormPaint(Sender: TObject);
    procedure Timer1Timer(Sender: TObject);
    procedure FormActivate(Sender: TObject);
    procedure FormDestroy(Sender: TObject);
  private
    { Private declarations }
  public
   bm:Tbitmap;

    { Public declarations }
  end;

var
  f_splash: Tf_splash;

implementation

{$R *.DFM}

procedure Tf_splash.imClick(Sender: TObject);
begin
 close;
end;

procedure Tf_splash.FormCreate(Sender: TObject);
begin
 bm:=Tbitmap.create;
 bm.LoadFromfile('splash.bmp');
end;

procedure Tf_splash.FormPaint(Sender: TObject);
begin
 im.Canvas.CopyRect(im.clientrect,bm.canvas,im.clientrect);
end;

procedure Tf_splash.Timer1Timer(Sender: TObject);
begin
 onpaint(sender);
 timer1.enabled:=false;
 refresh;
end;

procedure Tf_splash.FormActivate(Sender: TObject);
begin
  im.Canvas.CopyRect(im.clientrect,bm.canvas,im.clientrect);
  refresh;
end;

procedure Tf_splash.FormDestroy(Sender: TObject);
begin
 bm.free;
end;

end.
